package com.ruoyi.center.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.center.mapper.ResearchDirectionMapper;
import com.ruoyi.center.domain.ResearchDirection;
import com.ruoyi.center.service.IResearchDirectionService;

/**
 * 研究方向Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-08
 */
@Service
public class ResearchDirectionServiceImpl implements IResearchDirectionService 
{
    @Autowired
    private ResearchDirectionMapper researchDirectionMapper;

    /**
     * 查询研究方向
     * 
     * @param id 研究方向主键
     * @return 研究方向
     */
    @Override
    public ResearchDirection selectResearchDirectionById(Long id)
    {
        return researchDirectionMapper.selectResearchDirectionById(id);
    }

    /**
     * 查询研究方向列表
     * 
     * @param researchDirection 研究方向
     * @return 研究方向
     */
    @Override
    public List<ResearchDirection> selectResearchDirectionList(ResearchDirection researchDirection)
    {
        return researchDirectionMapper.selectResearchDirectionList(researchDirection);
    }

    /**
     * 新增研究方向
     * 
     * @param researchDirection 研究方向
     * @return 结果
     */
    @Override
    public int insertResearchDirection(ResearchDirection researchDirection)
    {
        return researchDirectionMapper.insertResearchDirection(researchDirection);
    }

    /**
     * 修改研究方向
     * 
     * @param researchDirection 研究方向
     * @return 结果
     */
    @Override
    public int updateResearchDirection(ResearchDirection researchDirection)
    {
        return researchDirectionMapper.updateResearchDirection(researchDirection);
    }

    /**
     * 批量删除研究方向
     * 
     * @param ids 需要删除的研究方向主键
     * @return 结果
     */
    @Override
    public int deleteResearchDirectionByIds(Long[] ids)
    {
        return researchDirectionMapper.deleteResearchDirectionByIds(ids);
    }

    /**
     * 删除研究方向信息
     * 
     * @param id 研究方向主键
     * @return 结果
     */
    @Override
    public int deleteResearchDirectionById(Long id)
    {
        return researchDirectionMapper.deleteResearchDirectionById(id);
    }
}
